#define _CRT_SECURE_NO_WARNINGS 1;

#include "vector.h"

namespace wlc
{
	template<class T>
	void Printf(const vector<T>& v)
	{ 
		for (auto ch : v)
		{
			cout << ch << " ";
		}
		cout << endl;
	}


	void test_vector1()
	{
		vector<int> v;
		v.push_back(1);
		v.push_back(2);
		v.push_back(3);
		v.push_back(4);
		v.push_back(5);
		v.push_back(6);
		v.Pop_back();
		v.Pop_back();
		v.Pop_back();
		v.Pop_back();
		v.Pop_back();
		v.Pop_back();
		v.insert(v.begin(), 1);
		v.insert(v.begin(), 2);
		v.insert(v.end(), 0);
		v.insert(v.begin()+1, 3);
		v.insert(v.begin() + 1, 3);
		v.insert(v.begin() + 1, 3);

		Printf(v);
		v.erase(v.begin());
		v.erase(v.end()-1);



		Printf(v);

	}

	void test_vector2()
	{
		vector<int> v;
		v.push_back(1);
		v.push_back(2);
		v.push_back(3);
		v.push_back(4);
		v.push_back(5);
		v.push_back(6);
		v.push_back(7);
		v.push_back(8);
		v.resize(12, 2);
		Printf(v);
		v.resize(2);
		Printf(v);




	}

	void test_vector3()
	{
		vector<int> v;
		v.push_back(1);
		v.push_back(1);
		v.push_back(1);
		v.push_back(1);
		v.push_back(1);
		v.push_back(1);


		Printf(v);

		vector<int> v2(v);


		Printf(v2);

		vector<int> v3 = { 1,2,3,4,5,6,7,8 };
		Printf(v3);

		//vector<int> v4(v3.begin()+1, v3.end()-1);

		//Printf(v4);

		vector<int> v5(5, 2);
		Printf(v5);

		v5 = v2;
		Printf(v5);
	}

	void test_vector4()
	{
		vector<string> v1;
		v1.push_back("111111111111111111111");
		v1.push_back("111111111111111111111");
		v1.push_back("111111111111111111111");
		v1.push_back("111111111111111111111");
		v1.push_back("111111111111111111111");


		Printf(v1);
	}
}


int main()
{

	wlc::test_vector4();

	return 0;
}